#ifndef SHORT_H
#define SHORT_H

#include <linux/semaphore.h>
#include <linux/cdev.h>

#define SHORT_NAME "short"
#define SHORT_CLASS_NAME "short_class"
#define SHORT_MINOR 0
#define SHORT_P_MINOR 1
#define SHORT_S_MINOR 2
#define SHORT_NR_DEVS 3

#define DEFAULT_BASE    0x378

// Use QEMU debug port for output
#define QEMU_DEBUG_PORT 0xe9

struct short_dev {
    struct cdev cdev;
    unsigned long base_addr;
    void *iomem_base;
    struct semaphore sem;
};

extern bool use_mem;
extern unsigned int base;

#endif /* SHORT_H */